#Boa:PopupWindow:PopupWinCategory

import wx
from MyListCtrl import MyCategoryTreeCtrl

def create(parent):
    return PopupWinCategory(parent)

[wxID_POPUPWINCATEGORY, wxID_POPUPWINCATEGORYBTNCANCEL, 
 wxID_POPUPWINCATEGORYBTNOK, 
] = [wx.NewId() for _init_ctrls in range(3)]

class PopupWinCategory(wx.PopupWindow):
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.PopupWindow.__init__(self, flags=wx.SIMPLE_BORDER, parent=prnt)
        self.SetSize(wx.Size(383, 530))
        self.Move(wx.Point(440, 151))
        self.SetName(u'PopupWinCategory')

        self.btnOK = wx.Button(id=wxID_POPUPWINCATEGORYBTNOK,
              label=u'\u786e\u5b9a', name=u'btnOK', parent=self,
              pos=wx.Point(280, 48), size=wx.Size(75, 24), style=0)
        self.btnOK.Bind(wx.EVT_BUTTON, self.OnBtnOKButton,
              id=wxID_POPUPWINCATEGORYBTNOK)

        self.btnCancel = wx.Button(id=wxID_POPUPWINCATEGORYBTNCANCEL,
              label=u'\u53d6\u6d88', name=u'btnCancel', parent=self,
              pos=wx.Point(280, 104), size=wx.Size(75, 24), style=0)
        self.btnCancel.Bind(wx.EVT_BUTTON, self.OnBtnCancelButton,
              id=wxID_POPUPWINCATEGORYBTNCANCEL)

    def __init__(self, parent):
        self._init_ctrls(parent)
        
        self.myInit()

    def myInit(self):
        self.category = MyCategoryTreeCtrl(self)
        self.category.SetSize(wx.Size(100, 400))
        self.category.Move(wx.Point(10, 10))

    def OnBtnOKButton(self, event):
        #
        self.Destroy()

    def OnBtnCancelButton(self, event):
        self.Destroy()
